home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / cstdio.arc / SRC.ARC / STRNCAT.C < prev    next >
C/C++ Source or Header  |  1984-07-29  |  363b  |  16 lines

  1. /*    strncat.c - concatenate 2 character strings.
  2.     (C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
  3.     G. R. Mansfield.  84/07/29.
  4.     Ver 1.0-4729.
  5. */
  6.  
  7. int strncat(s, t, n)    /* concatenate t to end of s; s must be large enough */
  8. char *s, *t;
  9. {
  10.     while (*s)    /* find end of t */
  11.         s++;
  12.     while (*s++ = *t++)    /* copy t */
  13.         if (n--)
  14.             break;
  15. }
  16.